<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
  </head>
  <body>
    <ul id="ul"></ul>
    <script type="text/javascript">
      const _createPage = (allItem, pageItem) => {
        // 补全代码
        var num = Math.ceil(allItem / pageItem)
        var ul = document.getElementById('ul')
        for (var i = 1; i <= num; i++) {
          lis = document.createElement('li')
          lis.innerHTML = i
          ul.appendChild(lis)
        }
      }
      _createPage(13, 3)
    </script>
  </body>
</html>
